Skip to content

Use temporary file for storing the downloaded OTA image. #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2020

Conversation

aentinger
Copy link
Contributor

@aentinger aentinger commented Jun 9, 2020

This PR adds an additional "rename" step where the file used for storing the downloaded OTA image ("UPDATE.BIN.TMP") is renamed to the one expected by the SFU ("UPDATE.BIN"). This step is only performed when a complete OTA image with valid checksum has been received. As a result this PR prevents the failure scenario of the device being turned off during reception of the update image.

@manchoz 👋

aentinger added 3 commits June 9, 2020 11:00
…as well as adding function for renaming a file on the OTA storage medium.
…ng (UPDATE.BIN.TMP) is renamed to the one expected by the SFU (UPDATE.BIN). This step is only performed when the complete file with valid checksum has been received
@aentinger aentinger added the type: enhancement Proposed improvement label Jun 9, 2020
@aentinger aentinger self-assigned this Jun 9, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2020

Codecov Report

Merging #138 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
+ Coverage   95.55%   95.57%   +0.02%     
==========================================
  Files          29       29              
  Lines         989      995       +6     
==========================================
+ Hits          945      951       +6     
  Misses         44       44              
Impacted Files Coverage Δ
src/utility/ota/OTALogic.h 100.00% <ø> (ø)
src/utility/ota/OTALogic.cpp 97.89% <100.00%> (+0.14%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ee31e5...248ce9c. Read the comment docs.

@aentinger aentinger merged commit 07bb78f into master Jun 9, 2020
@aentinger aentinger deleted the ota-use-temp-file-for-download branch June 9, 2020 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants